/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package skytestarmor;

/**
 *
 * @author Rakev
 */
public class AnyOfRegexBuilder {

    private StringBuilder regexBuilder = new StringBuilder("");

    public AnyOfRegexBuilder add(String regex) {
        regexBuilder.append("(").append(regex).append(")|");
        return this;
    }

    public String build() {
        if (regexBuilder.length() > 0) {
            return regexBuilder.deleteCharAt(regexBuilder.length() - 1).toString();
        } else {
            return "";
        }
    }
}
